// 寄生组合式继承
function parent(name, age) {
  this.name = name;
  this.age = age;
}

parent.prototype.getName = function() {
  return this.name;
}

parent.prototype.getAge = function() {
  return this.age;
}

function child(action, name, age) {
  parent.call(this, name, age);
  this.action = action;
}
child.prototype = Object.create(parent.prototype);

child.prototype.getAction = function() {
  return 'child loves '+ this.action;
}

let yy = new child('jump', 'chenyouyan', 5);